<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>协同智能办公系统</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<!--标准mui.css-->
		<link rel="stylesheet" href="css/mui.min.css">
		<!--App自定义的css-->
		<link rel="stylesheet" type="text/css" href="css/app.css"/>
				<style>
	.mui-table h4,.mui-table h5,.mui-table .mui-h5,.mui-table .mui-h6,.mui-table p{
		        margin-top: 0;
		    }
		    .mui-table h4{
		        line-height: 21px;
		        font-weight: 500;
		    }
		
		    .mui-table .oa-icon{
		        position: absolute;
		        right:0;
		        bottom: 0;
		    }
		    .mui-table .oa-icon-star-filled{
		        color:#f14e41;
		    }
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav" style="background-color:#fa1948;">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" style="color:#fff"></a>
			<h1 class="mui-title" style="color:#fff" id="head_title"></h1>
		</header>
		<div class="mui-content">
		    	<form class="mui-input-group">
					<ul id="fw_db" class="mui-table-view mui-table-view-striped mui-table-view-condensed" ></ul>
				</form>
		</div>
	</body>
	<script src="js/mui.js"></script>
	<script src="js/common.js"></script>
	<script>
		mui.plusReady(function () {
		    //获取url中的targetId参数
			var title = getUrlParam('title');
			alert((title));
			var processId = getUrlParam('processId');
			var name=plus.storage.getItem("username");
			document.getElementById("head_title").innerText = decodeURIComponent(title);
			
			mui.ajax(serviceUrl + "phone/taskList.html",{
				data:{
					userName: name,
					processId:processId
				},
				success:function(data){
					var $json = eval('('+data+')');
					var obj = $json['rows'];
					console.info(obj);
					var html  = "";
					mui.each(obj,function(index,item){
						var time = item.taskCreateTime;
						var vf_t = time.substring(time.indexOf("-")+1);
						html+= '<li class="mui-table-view-cell">';
				        html+= '<div class="mui-table">';
				        html+= '<div class="mui-table-cell mui-col-xs-10">';
				        html+= '<h4 class="mui-ellipsis">'+item.taskVariable+'</h4>';
				        html+= '<h5>创建人：'+item.creater+' <span> 流程名称:'+item.taskName+'</span> <span>任务名称：'+item.processName+'</span></h5>';		                    
				        html+= '</div>';
				        html+= '<div class="mui-table-cell mui-col-xs-2 mui-text-right">';
				        html+= '<span class="mui-h5">'+vf_t+'</span>';
				        html+= '</div>';
				        html+= '</div>';
		        		html+= '</li>';
					}) 
					document.getElementById("fw_db").innerHTML = html;
				}
			});
		})
	</script>
</html>